package com.googlecode.lookie.platform.osgi;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanPostProcessor;

public class BeanPostProcessorAdapter
    implements BeanPostProcessor
{

    private BeanPostProcessor adaptee;

    public BeanPostProcessorAdapter()
    {
        super();
    }

    public BeanPostProcessorAdapter( BeanPostProcessor adaptee )
    {
        super();
        this.adaptee = adaptee;
    }

    public BeanPostProcessor getAdaptee()
    {
        return adaptee;
    }

    public void setAdaptee( BeanPostProcessor adaptee )
    {
        this.adaptee = adaptee;
    }

    public Object postProcessAfterInitialization( Object bean, String beanName )
        throws BeansException
    {
        return adaptee.postProcessAfterInitialization( bean, beanName );
    }

    public Object postProcessBeforeInitialization( Object bean, String beanName )
        throws BeansException
    {
        return adaptee.postProcessBeforeInitialization( bean, beanName );
    }

}
